package month4.day5.xingzuang;

public class Triangle extends Graph{
    private double r1;
    private double r2;
    private double r3;
    public boolean a(){
        if(r1+r2>r3&&r1+r3>r2&&r2+r3>r1){
            return true;
        }
        return false;
    }

    public double c(){
            return r1+r2+r3;
    }
    public double s(){
            double p=(r1+r2+r3)/2;
            return Math.sqrt(p*(p-r1)*(p-r2)*(p-r3));
    }

    public Triangle(double r1, double r2, double r3) {
        this.r1 = r1;
        this.r2 = r2;
        this.r3 = r3;
    }

    public double getR1() {
        return r1;
    }

    public void setR1(double r1) {
        this.r1 = r1;
    }

    public double getR2() {
        return r2;
    }

    public void setR2(double r2) {
        this.r2 = r2;
    }

    public double getR3() {
        return r3;
    }

    public void setR3(double r3) {
        this.r3 = r3;
    }
}
